package com.neoCalf.neoAuth.service;

import com.neoCalf.neoCommon.entity.UserInfo;
import com.neoCalf.neoCommon.exception.AuthException;
import org.springframework.stereotype.Service;

import java.util.Map;


public interface AuthService {
    /**
     * 创建token
     *
     * @return
     */
    String createToken(UserInfo userInfo);

    /**
     * 验证token
     *
     * @param token
     * @param role
     * @return
     */
    Map<String, Object> validateToken(String token, String role) throws AuthException;
}
